<%@ page import="java.sql.*" %><%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2018/4/3
  Time: 20:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>user delete</title>
</head>
<body>
<a href="userList.jsp">返回用户列表</a></br>


<h2>删除成功</h2>
<%
    request.setCharacterEncoding("UTF-8");
    String  id=request.getParameter("id");
//    String name=request.getParameter("name");
//    String password=request.getParameter("password");

    Connection connection=null;
    Statement statement=null;


    String sql="DELETE FROM user WHERE id = "+id+"";

    Class.forName("com.mysql.jdbc.Driver");

    connection= DriverManager.getConnection(
            "jdbc:mysql://localhost:3306/sctu_javaweb_2018?serverTimezone=UTC",
            "root",
            "121212");
    statement=connection.createStatement();
    boolean resultSet  =statement.execute(sql);


    statement.close();
    connection.close();

%>

</body>
</html>
